import { Column, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn} from "typeorm";
import StrategyEntity from "../strategy/strategy.entity";


@Entity()
export default class WatchEntity{
    @PrimaryGeneratedColumn()
    public id!: number | string;

    @Column({type: 'varchar'})
    public symbol!: string ;

    @ManyToOne(() => StrategyEntity, { onDelete: 'CASCADE' })
    @JoinColumn({ name: 'strategy_id' })
    public strategy: StrategyEntity;
    public strategy_id: number;

    @Column({type: 'tinyint', default: 1})
    public enable: boolean;
}